package io;

import java.io.*;
import java.nio.charset.StandardCharsets;

public class PwDemo {
    public static void main(String[] args) throws IOException {
        FileOutputStream fos=new FileOutputStream("pw.txt");
        OutputStreamWriter osw=new OutputStreamWriter(fos, StandardCharsets.UTF_8);
        BufferedWriter bw=new BufferedWriter(osw);
        PrintWriter pw=new PrintWriter(bw);
        pw.println("加油");
        pw.println("China!");
        pw.println("加油");
        pw.println("华为!");
        System.out.println("写出完毕");
        pw.close();
    }
}